package com.demo.study.structural.d07_proxy;

import lombok.Data;

/**
 * @author Baymax
 * @since 2021/1/17
 */
@Data
public class Gun implements Weapon {
    private int bullet;

    @Override
    public void fire() {
        if (bullet == 0) {
            System.out.println("子弹为空，请上弹！");
        }
        System.out.println("砰砰砰...，打了" + getBullet() + "颗子弹。");
    }
}
